package com.fr.report.web.ui;

import com.fr.base.FRContext;
import com.fr.base.core.ComparatorUtils;
import com.fr.base.core.FRCoreContext;
import java.util.logging.Level;
import java.util.logging.Logger;

public class BasicWidgetConfig extends AbstractWidgetConfig
{
  private String classPath;

  public String getClassPath()
  {
    return this.classPath;
  }

  public void setClassPath(String paramString)
  {
    this.classPath = paramString;
  }

  public Widget toWidget()
  {
    Widget localWidget;
    try
    {
      localWidget = (Widget)FRCoreContext.classForName(this.classPath).newInstance();
      return localWidget;
    }
    catch (Exception localException)
    {
      FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
    }
    return null;
  }

  public boolean equals(Object paramObject)
  {
    return ((paramObject instanceof BasicWidgetConfig) && (ComparatorUtils.equals(((BasicWidgetConfig)paramObject).classPath, this.classPath)));
  }
}